package org.jeecg.modules.logistics.manage.hz_info.service.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import org.jeecg.modules.logistics.manage.hz_info.entity.HzInfo;
import org.jeecg.modules.logistics.manage.hz_info.mapper.HzInfoMapper;
import org.jeecg.modules.logistics.manage.hz_info.service.IHzInfoService;
import org.jeecg.modules.logistics.manage.sj_info.entity.SjInfo;
import org.jeecg.modules.logistics.manage.sj_info.mapper.SjInfoMapper;
import org.jeecg.modules.logistics.manage.sj_info.service.ISjInfoService;
import org.jeecg.modules.logistics.manage.wljd_info.entity.WljdInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description: 货主全部信息
 * @Author: 唐小尊
 * @Date:   2019-11-04
 * @Version: V1.0
 */
@Service
@DS("freight")
public class HzInfoServiceImpl implements IHzInfoService {
    @Autowired
    HzInfoMapper hzInfoMapper;

    @Override
    public HzInfo getOneHzInfo(String hzId) {
        HzInfo hzInfo = hzInfoMapper.getOneHzInfo(hzId);
        hzInfo.setHzBeiPj(hzInfoMapper.getHzBeiPj(hzId));
        hzInfo.setHzHw(hzInfoMapper.getHzHw(hzId));
        hzInfo.setHzPj(hzInfoMapper.getHzPj(hzId));
        return hzInfo;
    }

    @Override
    public List<HzInfo> getHzInfoList() {
        List<HzInfo> hzInfos = hzInfoMapper.getHzInfoList();
        return hzInfos;
    }

    @Override
    public List<WljdInfo> getOneHzAllWljd(String user_id) {
        return hzInfoMapper.getOneHzAllWljd(user_id);
    }
}
